package com.rc.rc_exam.controller;

import com.rc.rc_exam.entity.RCExamTest;
import com.rc.rc_exam.entity.web.Result;
import com.rc.rc_exam.service.RCExamTestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api")
@CrossOrigin
@Api(tags = "考试记录接口")
public class RcExamTestController {

    @Autowired
    private RCExamTestService rcExamTestService;

    @GetMapping("/findTestRecord")
    @ApiOperation("查询考试记录")
    public Result selectTestRecord(){
        List<RCExamTest> rcExamTestList = rcExamTestService.list();
        return Result.ok(rcExamTestList);
    }
}
